#version 450

layout(location=0)      in vec3 a_Pos;
layout(location=1)      in vec2 a_Texcoord;

layout(set=0, binding=0, std140) uniform FrameUbo{
    mat4  projMat;
    mat4  viewMat;
    ivec2 resolution;
    uint  frameId;
    float time;
} frameUbo;

layout(set=0, binding=1, std140) uniform ModelUbo{
    mat4  modelMat;
} modelUbo;

out gl_PerVertex{
    vec4 gl_Position;
};

layout(location=0) out vec2 v_Texcoord;

void main(){
    gl_Position = frameUbo.projMat * frameUbo.viewMat * modelUbo.modelMat * vec4(a_Pos.x, a_Pos.y, a_Pos.z, 1.f);
    v_Texcoord = a_Texcoord;
}
